package com.shenhua.test.rest;

/**
 * @ClassName BizException
 * @Description 业务自定义异常
 * @Author liqinchao
 * @Date 2021/3/23 16:31
 * @Version 1.0
 */
public class BizException extends RuntimeException {

    private BizErrorCode errorCode;

    private String message;


    public BizException(BizErrorCode errorCode) {
        this.errorCode = errorCode;
        this.message = errorCode.getMessage();
    }

    public BizException(BizErrorCode errorCode, String message) {
        this.errorCode = errorCode;
        this.message = message;
    }
    public BizErrorCode getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(BizErrorCode errorCode) {
        this.errorCode = errorCode;
    }


}
